/* 
 * File:   Resource.h
 * Author: artem
 *
 * Created on November 18, 2011, 10:51 PM
 */

#ifndef RESOURCE_H
#define RESOURCE_H

#include "Common.h"

namespace Resource
{
	struct File
	{
		uint8_t  *data;
		uint32_t  size;
		
		File(): data(NULL), size(0) {}
		File(uint32_t size): size(size) { data = new uint8_t[size]; }
		~File() { delete[] data; }
	};

	bool init();
	void free();
	
	File* loadFile(const char *name);
	void freeFile(File *file);
}

#endif /* RESOURCE_H */
